package org.itboys.seller.service;

import org.itboys.mongodb.core.MongoDataSource;
import org.itboys.mongodb.service.BaseService;
import org.itboys.mongodb.utils.page.Page;
import org.itboys.seller.dto.SiteUserVO;
import org.itboys.seller.entity.RankingUserDB;
import org.itboys.seller.entity.ScoreResourceDB;
import org.itboys.seller.entity.SiteUser;
import org.itboys.seller.meta.Account;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * Created by Administrator on 2016/6/13.
 */
@Service
public class ScoreResourceService extends BaseService<ScoreResourceDB, Long> {

    @Resource(name="sellerDS")
    private MongoDataSource ds;

    @Autowired
    private CaliforniaSiteUserService californiaSiteUserService;

    @Override
    protected MongoDataSource getMongoDataSource() {
        return ds;
    }

    @Override
    protected Class<ScoreResourceDB> getEntityClass() {
        return ScoreResourceDB.class;
    }

    /**
     * 分页查询
     *
     * @param id
     * @return
     */
    public Page<ScoreResourceDB> pageQueryAll(HttpServletRequest request) {
        return pageQuery(request);
    }
}
